﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<skags.Models.LinksTablesViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Tenglar eftir flokk
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="navigation">
<% Html.RenderPartial("LinkNavigation"); %>
<ul>
<li><a>Flokkar:</a>
<ul>
<%
    foreach(var s in Model.Categories)
    {
        %>
        <li><%: Html.ActionLink(s.Title, "Category", new { id = s.ID })%></li>
        <%
    }
     %>
     </ul>
     </li>
     </ul>
</div>
<div id="content">
<%
    if (Model.Links.Count() == 0)
    {
        Response.Write("Engir tenglar í þessum flokk.");
    }
    else
    {
%><h3><%:ViewData["CategoryName"]%></h3><ul>
<%
        foreach (var l in Model.Links)
        {
           %>
                <li><a href="<%:l.Url%>" title="<%:l.Title%>" target="_blank"><%:l.Title%></a></li>
           <%
        }
        %></ul><%
    }
     %>
</div>
</asp:Content>
